from PyQt4.QtCore import *
from PyQt4.QtSql import *

class Utility(QObject):
    def __init__(self,  dbConn=None):
        self.skr = QDateTime()
        self.db = dbConn
        
    def getServerToday(self):
        query = QSqlQuery(self.db)
        query.exec_("select current_timestamp from master_user")
        while query.next():
            self.skr = query.value(0).toDateTime()
        return self.skr
        
    def setDBParm(self):
        self.db.setUserName("matos")
        self.db.setPassword("mtsbede")
        return self.db
        
